import {request} from './request';
import api from '@/conf/api.js';


export function getTopic(tid) {
  return request({
    url:api.topic,
    header:{
    	AUTHORIZATION:api.token
    },
    method:"GET",
    dataType:"JSON"
  })
}

export function getTopicDetail(did,bool,mid) {
  return request({
    url:api.topic+`${did}/?order=${bool}&mid=${mid}`,
    header:{
    	AUTHORIZATION:api.token
    },
    method:"GET",
    dataType:"JSON"
  })
}
export function getTopicDate(iid) {
  return request({
    url:api.topic_detail+iid+"/",
    header:{
    	AUTHORIZATION:api.token
    },
    method:"GET",
    dataType:"JSON"
  })
}


export function getTopicNav() {
  return request({
    url:api.topic_nav,
    header:{
    },
    method:"GET",
    dataType:"JSON"
  })
}